< previous page page_324 next page >

Page 324
12181-0324a.gif
Figure 12.9.
The Data Environment graphically shows which commands are
children of other commands that have been defined.
Caution
A Child command must contain at least one column that relates to a column in the Parent command.

To summarize the Data Environment Designer's capabilities, it provides you with database administration, enabling you to design complex queries for your application. More importantly, it provides a central repository for many commands and queries that will be used by your application. This allows you to define all the required queries in one place to simplify their maintenance.
Using the Data Environment to Access the Database
Once you add a Data Environment to your application, you can reference the connections and commands in the program code to access data in the database. At runtime, the Data Environment creates an ADO Command and Connection object for each command and connection that you defined in the Data Environment. If you mark the command object as a Recordset in the Advanced tab of the Command Properties dialog, an ADO Recordset object is also created. The ADO Command object is added as a method of the Data Environment runtime object, and the ADO Connection and Recordset objects are added as properties.

 
< previous page page_324 next page >

If you like this book, buy it!